

package com.kimo.shop.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kimo.shop.bean.dto.FlowAnalysisDto;
import com.kimo.shop.bean.dto.SystemDto;
import com.kimo.shop.bean.model.FlowUserAnalysis;
import com.kimo.shop.bean.param.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author kimo-taozhouchuan
 * @date 2020-07-17 09:50:13
 */
public interface FlowUserAnalysisMapper extends BaseMapper<FlowUserAnalysis> {

    List<FlowUserAnalysis> getUserAnalysisData(@Param("startTime") Date startTime, @Param("endTime") Date endTime);

    Integer countAddCartProdNum(@Param("param") ProdAnalysisSurveyParam param);

    List<FlowAnalysisDto> flowTrend(@Param("flowAnalysisParam") FlowAnalysisParam flowAnalysisParam);

    List<FlowAnalysisDto> flowSour(@Param("flowAnalysisParam") FlowAnalysisParam flowAnalysisParam);

    List<FlowAnalysisDto> getFlowAnalysisData(@Param("flowAnalysisParam") FlowAnalysisParam flowAnalysisParam, @Param("startTime") Date startTime);

    List<SystemDto> systemTypeNums(@Param("flowAnalysisParam") FlowAnalysisParam flowAnalysisParam);

    List<ProdAnalysisDataParam> countProdVisitorNum(@Param("param") ProdAnalysisSurveyParam param);

    List<ProdAnalysisDataParam> analysisSurvey(@Param("param") ProdAnalysisSurveyParam param);

    /**
     * 获取用户留存率, 统计用户第一次访问后，之后的几个月的留存用户数
     *
     * @param param 条件查询参数
     * @return 访问留存信息列表
     */
    List<CustomerRetainRespParam> getVisitRetained(@Param("param") CustomerRetainedReqParam param);

    Integer countAddCartUserNum(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
